8 Labelling tracks
In this last chapter, we will tackle the challenge of labelling your tag!
This chapter assumes that you are familiar with the overall process of GeoPressureR presented in the Basic tutorial, as well as the concept of pressurepath and the use of GeopressureViz.
8.1 Labelling principles
Labelling your tracks is imperative because GeoPressureR requires highly precise and well-defined pressure timeseries of a fixed/constant location both horizontally (geographical: +/- 10-50km) and vertically (altitude: +/- 2m).
The procedure involves labelling each datapoint (1) with the flight label when the bird is in active migratory flight and (2) with the discard label for pressure datapoints that should be discarded from the matching exercise. The overall objective is to create a pressure timeseries for each stationary period where the bird can be assumed to remain at the same location and elevation during the entire period.
Labelling
flightdefines stationary periods and flight duration. A stationary period is a period during which the bird is considered static relative to the size of the grid (~10-50km). The start and end of the stationary period is used to define the pressure timeseries to be matched. Having an accurate flight duration is critical to correctly estimate the distance traveled by the bird between two stationary periods.Labelling
discardeliminates vertical (altitudinal) movements of the bird. The algorithm matching the pressure timeseries is sensitive to small pressure variations of a few hPa, such that even altitudinal movements of a couple of meters can throw off the estimation map for short stationary periods. Since the reanalysis data to be matched is provided at a single pressure level, we must discard all data points corresponding to a different elevation.
Each species’ migration behaviour is so specific that manual editing remains the fastest option. Indeed, small changes in pressure and activity can correspond to either local movement or slow migration. Expertise on your bird’s expected migration style will be essential to correctly label your tracks. As you label, you will learn how the bird is moving (e.g. long continuous high altitude flights, short flights over multiple days, alternation between short migration flights and stopovers, etc.). Manual editing also gives a sense of the uncertainty of your labelling, which is useful to interpret your results.
8.2 With or without acceleration data
Acceleration data can significantly improve our understanding of bird activity and movement. One of its main strength is to refine short stationary periods or flights at the end of the night, when birds tend to flight low. In addition, acceleration is typically recorded at a higher temporal resolution (5min), which can refine flight duration and thus the movement model when building the trajectory.
Which timeseries should I label?
When acceleration data is available, use the flight label on the acceleration timeseries, and the discard label on the pressure timeseries.
In the absence of acceleration data, both labels are applied to the pressure timeseries.
Let’s see an example using acceleration data with 18LX.
tag <- tag_create("18LX",
crop_start = "2017-06-20",
crop_end = "2018-05-02"
)## ✔ Read './data/raw-tag/18LX//18LX_20180725.pressure'
## ✔ Read './data/raw-tag/18LX//18LX_20180725.glf'
## ✔ Read
## './data/raw-tag/18LX//18LX_20180725.acceleration'
Acceleration can be used to initialize the flight label automatically. tag_label_auto() first classifies low and high activity using a k-mean clustering, and then identifies and labels long periods of high activity (e.g., lasting more than 30 minutes) as flights.
tag <- tag_label_auto(tag, min_duration = 30)
plot(tag, type = "acceleration")More classification methods are described in the PALMr manual.
8.3 Elevation period
It is common for birds to change elevation level within the same stationary period (e.g., roost vs feeding site or altitudinal movements for mountainous species).
Such movements can result in drastic variations in pressure, which interfere with the ERA-5 matching exercise.
To circumvent this issue while preserving as much data as possible in the match, you can label pressure data with different elevation levels within the same stationary period by using elev_x. To do so, in Trainset click on the + sign in the bottom right to add a new elevation level. Note that the numbering of elevation levels does not have to be continuous. For instance, always apply the same elev_# to the roosting site as it is at the same elevation.
By default, when no elev_x label is assigned, all points within the stationary period are assumed to be at "elev_1".
Illustration to come
8.4 The process
Labelling is an iterative process where you will need to check the validity of the pressure timeseries for a given stationary period against the reanalysis data several times. You can expect to spend 30sec to 30min per track, depending on the species’ complexity (acceleration data, number of flights, altitude of flight etc…).
The tag_label() function can be used to guide you through the entire labelling process, but we also outline each step below:
# 1. Create the csv label file `"./data/tag-label/18LX.csv"`
tag_label_write(tag)
# 2. Edit csv file on Trainset
# *on TRAINSET*
# 3. Export csv file `"./data/tag-label/18LX-labeled.csv"`
# *on TRAINSET*
# 4. Read exported label file
tag <- tag_label_read(tag)
# 5. Compute stationary period data.frame tag$stap
tag <- tag_label_stap(tag)Any subsequent modification of the csv file "./data/tag-label/18LX-labeled.csv" can be directly processed (steps 4-5) using tag_label().
8.5 Introduction to TRAINSET
We suggesting using TRAINSET, a web-based graphical tool for labelling timeseries.
New Trainset
We developed a customized version of TRAINSET for labelling tags and twilight data:
https://trainset.raphaelnussbaumer.com/
Please report issues or bugs on the Github repository.
The original TRAINSET app therefore does not need to be used here.
Start by uploading your .csv file (e.g., data/tag-label/18LX.csv) using the “Upload Tag Label” button.

A few tips:
- Keyboard shortcuts can considerably speed up navigation (zoom in/out, move left/right) and labelling (add/remove a label)., e.g. using SHIFT.
- Because of the large number of datapoints, keep a narrow temporal window to avoid your browser from becoming slow or unresponsive.
- Change the
Active SeriesandReference Seriesdepending on what you are labelling but use both timeseries at the same time to help you determine what the bird might be doing. - Adapt the y-axis range to each stationary period to see the small (but essential) pressure variations which are not visible in the full view.
8.6 Four steps to check labelling
Use the checks outlined below to evaluate and improve the quality of your labelling.
8.6.1 Check 1: Duration of stationary periods and flights
The first test consists in checking the duration of flights and stationary periods. This is systematically checked when computing stationary periods and a message will give you feedback on where to find potential errors.
tag <- tag_label(tag, "./data/tag-label/18LX-labeled-v1.csv")##
## ── Short stationary periods:
## ! Stap 7 (2017-08-30 23:50 - 2017-08-30 23:50) : 0ms
## ! Stap 26 (2018-04-15 15:00 - 2018-04-15 18:45) : 3h
## 45m
## ! Stap 27 (2018-04-15 19:35 - 2018-04-15 20:05) : 30m
## ! Stap 30 (2018-04-29 23:40 - 2018-04-29 23:40) : 0ms
## ! Stap 32 (2018-04-30 19:25 - 2018-04-30 19:35) : 10m
## ! Stap 33 (2018-04-30 21:50 - 2018-04-30 21:50) : 0ms
## ! Stap 34 (2018-04-30 23:05 - 2018-04-30 23:05) : 0ms
## ! Stap 35 (2018-05-01 00:05 - 2018-05-01 00:05) : 0ms
##
## ── Short flights:
## ! Flight 14 -> 15 (2017-09-11 23:30 - 2017-09-12 00:25)
## : 55m
## ! Flight 18 -> 19 (2017-09-19 23:30 - 2017-09-20 00:45)
## : 1h 15m
## ! Flight 26 -> 27 (2018-04-15 18:45 - 2018-04-15 19:35)
## : 50m
## ! Flight 27 -> 28 (2018-04-15 20:05 - 2018-04-15 21:40)
## : 1h 35m
## ! Flight 31 -> 32 (2018-04-30 18:35 - 2018-04-30 19:25)
## : 50m
## ! Flight 33 -> 34 (2018-04-30 21:50 - 2018-04-30 23:05)
## : 1h 15m
## ! Flight 34 -> 35 (2018-04-30 23:05 - 2018-05-01 00:05)
## : 1h
## ! Flight 35 -> 36 (2018-05-01 00:05 - 2018-05-01 00:50)
## : 45m
Here, I used the label produced by tag_label_auto() without making any edits on TRAINSET. The most common error here is that a flight is cut because the bird was inactive during a few datapoints. You can correct this by cleaning up flights on TRAINSET (more on this below).
tag <- tag_label(tag, "./data/tag-label/18LX-labeled-v2.csv")##
## ── Short stationary periods:
## ! Stap 25 (2018-04-15 15:05 - 2018-04-15 18:45) : 3h
## 40m
##
## ── Short flights:
## ! Flight 13 -> 14 (2017-09-11 23:30 - 2017-09-12 00:25)
## : 55m
## ! Flight 17 -> 18 (2017-09-19 23:30 - 2017-09-20 01:10)
## : 1h 40m
Depending on your species and desired level of precision, you may want to keep some short flights and/or short stationary periods.
8.6.2 Check 2: Pressure timeseries
Here we visually inspect that the pressure timeseries of each stationary period (1) is correctly grouped and (2) does not include pressure outliers (e.g., altitudinal movements). We can use the generic plot() function with a tag object to display the timeseries and print messages on the quality of the timeseries for each stationary period.
Note that the plot shows the preprocessed data (see geopressure_map_preprocess()), which is designed to be efficiently matched against ERA-5 data (flight and outliers removed and data downscaled to 1 hour).
plot(tag, type = "pressure")##
## ── Pre-processed pressure data length
## ✔ All stationary periods have more than 12 datapoints.
##
## ── Pressure difference
## → 2 timestamps show abnormal hourly change in pressure
## (i.e., >3hPa):
## ! 2017-09-01 10:30:00 | stap: 8 | 3.8 hPa
## ! 2017-10-01 17:30:00 | stap: 18 | 3 hPa
Plotting this figure with Plotly allows you to zoom-in and pan to check the timeseries of each stationary period manually. Make sure each stationary period does not include any pressure measurement from a flight or a vertical movement by using the discard label on TRAINSET.
8.6.3 Check 3: Pressure timeseries match
The next check is more complex and computationally costly but allows to fine-tune the final trajectory. The general idea is to perform the following steps iteratively:
- Estimate our current best guess of the trajectory (i.e. a
path) - Compute the ERA-5 pressure on this path (i.e.,
pressurepath), - Compare the ERA-5 pressure to the tag pressure
- Refine the label accordingly: (1) label outliers, (2) merge or split stationary periods, and (3) use the
elev_xlabel.
This check uses the light and pressure likelihood maps to estimate the path.
First, let’s compute these maps on a coarse map (e.g. scale = 1) and low precision of mismatch (e.g. max_sample = 50) to minimize the computational cost.
tag <- tag_create("18LX", crop_start = "2017-06-20", crop_end = "2018-05-02") |>
tag_label("./data/tag-label/18LX-labeled-v3.csv") |>
tag_set_map(
extent = c(-16, 23, 0, 50),
scale = 1,
known = data.frame(
stap_id = 1,
known_lat = 48.9,
known_lon = 17.05
)
) |> # Define a coarse grid during the labeling
geopressure_map(max_sample = 50) # compute the likelihood maps for each stationary period with low precision## ✔ Read './data/raw-tag/18LX//18LX_20180725.pressure'
## ✔ Read './data/raw-tag/18LX//18LX_20180725.glf'
## ✔ Read
## './data/raw-tag/18LX//18LX_20180725.acceleration'
##
## ── Short stationary periods:
## ! Stap 25 (2018-04-15 15:05 - 2018-04-15 18:45) : 3h
## 40m
##
## ── Short flights:
## ! Flight 13 -> 14 (2017-09-11 23:25 - 2017-09-12 00:25)
## : 1h
## ! Flight 17 -> 18 (2017-09-19 23:30 - 2017-09-20 01:10)
## : 1h 40m
##
ℹ Pre-process pressure data
##
✔ Pre-process pressure data [1.5s]
##
⠙ Generate requests for 28 stapelev (on GeoPressureAPI)
✔ Generate requests for 28 stapelev (on GeoPressureAPI)…
##
⠙ Sending requests for 28 stationary periods: 2|0, 3|0,…
✔ Sending requests for 28 stationary periods: 2|0, 3|0,…
##
⠙ 1/28 ETA: 1s |
⠹ 2/28 ETA: 3s |
⠸ 3/28 ETA: 4s |
⠼ 4/28 ETA: 4s |
⠴ 5/28 ETA: 4s |
⠦ 6/28 ETA: 4s |
⠧ 7/28 ETA: 4s |
⠇ 8/28 ETA: 5s |
⠏ 9/28 ETA: 5s |
⠋ 10/28 ETA: 5s |
⠙ 11/28 ETA: 5s |
⠹ 12/28 ETA: 4s |
⠸ 13/28 ETA: 4s |
⠼ 14/28 ETA: 4s |
⠴ 15/28 ETA: 4s |
⠦ 16/28 ETA: 4s |
⠧ 17/28 ETA: 4s |
⠇ 18/28 ETA: 4s |
⠏ 19/28 ETA: 4s |
⠋ 20/28 ETA: 3s |
⠙ 21/28 ETA: 3s |
⠹ 22/28 ETA: 3s |
⠸ 23/28 ETA: 2s |
⠼ 24/28 ETA: 2s |
⠴ 25/28 ETA: 2s |
⠦ 26/28 ETA: 1s |
⠧ 27/28 ETA: 1s |
ℹ Compute maps (on GEE server) and download .geotiff
✔ Compute maps (on GEE server) and download .geotiff [1…
##
⠙ 1/28 ETA: 1s |
⠹ 2/28 ETA: 1s |
⠸ 3/28 ETA: 2s |
⠼ 4/28 ETA: 2s |
⠴ 5/28 ETA: 2s |
⠦ 6/28 ETA: 2s |
⠧ 7/28 ETA: 2s |
⠇ 8/28 ETA: 12s |
⠏ 9/28 ETA: 10s |
⠋ 10/28 ETA: 17s |
⠙ 11/28 ETA: 15s |
⠹ 12/28 ETA: 13s |
⠸ 13/28 ETA: 11s |
⠼ 14/28 ETA: 10s |
⠴ 15/28 ETA: 8s |
⠦ 16/28 ETA: 7s |
⠧ 17/28 ETA: 6s |
⠇ 18/28 ETA: 5s |
⠏ 19/28 ETA: 7s |
⠋ 20/28 ETA: 6s |
⠙ 21/28 ETA: 5s |
⠹ 22/28 ETA: 4s |
⠸ 23/28 ETA: 3s |
⠼ 24/28 ETA: 3s |
⠴ 25/28 ETA: 2s |
⠦ 26/28 ETA: 1s |
⠧ 27/28 ETA: 1s |
ℹ Process maps
✔ Process maps [397ms]
tag <- tag |>
twilight_create() |>
twilight_label_read() |>
geolight_map()From these maps, we can compute the path that goes through the stationary periods with the highest probability. However, this path is likely not realistic as no movement model has been included (i.e., no limitation on bird flight duration). This is fine at this stage: we don’t really want to assume a realistic path, just to see what pressure can tell us without assuming anything.
path <- tag2path(tag)Using this path, we can retrieve the ERA5 pressure along this path using pressurepath_create
pressurepath <- pressurepath_create(tag, path = path)##
⠙ Generate requests (on GeoPressureAPI) for 29 stationa…
✔ Generate requests (on GeoPressureAPI) for 29 stationa…
##
⠙ 1/29 ETA: 5s |
⠹ 2/29 ETA: 6s |
⠸ 3/29 ETA: 6s |
⠼ 4/29 ETA: 6s |
⠴ 5/29 ETA: 6s |
⠦ 6/29 ETA: 6s |
⠧ 7/29 ETA: 7s |
⠇ 8/29 ETA: 7s |
⠏ 9/29 ETA: 7s |
⠋ 10/29 ETA: 6s |
⠙ 11/29 ETA: 6s |
⠹ 12/29 ETA: 6s |
⠸ 13/29 ETA: 6s |
⠼ 14/29 ETA: 6s |
⠴ 15/29 ETA: 5s |
⠦ 16/29 ETA: 5s |
⠧ 17/29 ETA: 5s |
⠇ 18/29 ETA: 5s |
⠏ 19/29 ETA: 4s |
⠋ 20/29 ETA: 4s |
⠙ 21/29 ETA: 4s |
⠹ 22/29 ETA: 3s |
⠸ 23/29 ETA: 3s |
⠼ 24/29 ETA: 3s |
⠴ 25/29 ETA: 2s |
⠦ 26/29 ETA: 2s |
⠧ 27/29 ETA: 1s |
⠇ 28/29 ETA: 1s |
⠙ Compute and download timeseries (on GEE server)
✔ Compute and download timeseries (on GEE server) [10ms]
##
⠙ 1/29 ETA: 1s |
⠹ 2/29 ETA: 2s |
⠸ 3/29 ETA: 1s |
⠼ 4/29 ETA: 1s |
⠴ 5/29 ETA: 12s |
⠦ 6/29 ETA: 9s |
⠧ 7/29 ETA: 9s |
⠇ 8/29 ETA: 11s |
⠏ 9/29 ETA: 11s |
⠋ 10/29 ETA: 13s |
⠙ 11/29 ETA: 11s |
⠹ 12/29 ETA: 11s |
! Requested position is on water and will be move to the closet point on shore
## (<https://www.google.com/maps/dir/36.5,-3.5/36.825,-3.475>) located 33 km
## away.
##
⠸ 13/29 ETA: 11s |
⠼ 14/29 ETA: 13s |
⠴ 15/29 ETA: 11s |
⠦ 16/29 ETA: 11s |
⠧ 17/29 ETA: 9s |
⠇ 18/29 ETA: 11s |
⠏ 19/29 ETA: 9s |
⠋ 20/29 ETA: 12s |
⠙ 21/29 ETA: 10s |
⠹ 22/29 ETA: 8s |
⠸ 23/29 ETA: 7s |
⠼ 24/29 ETA: 5s |
⠴ 25/29 ETA: 4s |
! Requested position is on water and will be move to the closet point on shore
## (<https://www.google.com/maps/dir/39.5,17.5/39.275,17.075>) located 48 km
## away.
##
⠦ 26/29 ETA: 3s |
! Requested position is on water and will be move to the closet point on shore
## (<https://www.google.com/maps/dir/41.5,16.5/41.275,16.275>) located 35 km
## away.
##
⠧ 27/29 ETA: 2s |
⠇ 28/29 ETA: 1s |
Using plot_pressurepath(), we can visualize the pressure timeseries of the tag (grey) and of the pressurepath. Zoom on each stationary period to get a better sense of the likely natural variation of pressure.
plot_pressurepath(pressurepath)What is an outlier?
The conversion of the mean squared error (MSE) into a likelihood performed by geopressure_map_likelihood() assumes that the error distribution of pressure is normally distributed. This has important consequences in that it does not perform well in the presence of large errors, typically resulting in a map with a single possible pixel.
Assuming this normal distribution allows us to define more formally outliers as any value outside +/- 3 standard deviation (warning_std_thr). This standard deviation is defined by the parameter sd, with a default value of 1.
plot_pressurepath() displays outliers with an orange warning sign so you can check each of them manually.
Besides outliers, you can use this figure to identify any period where there is a mismatch between the geolocator and ERA5, usually indicative of altitudinal movement of the bird. Depending on the situation, there are multiple ways of labelling this mismatch.
- In the easiest case, the bird simply flew within the same stationary site (<10-50km) for a short time and came back to the same location. In this case, you can simply discard the pressure timeseries during the temporary change of altitude.
- If the bird changes altitude but never comes back to the same elevation, you can either consider that the new altitude is a new stationary period and label the activity data, or you can discard the timeseries of the shorter period. It is essential that the resulting timeseries matches the ERA5 pressure everywhere. Matches are usually better for longer periods. Looking at activity data for the same period can also help understand what the bird is doing.
- If the bird changes back and forth between two elevation levels, use the
elev_xlabel to label them accordingly.
As a general guideline, it is better to remove a bit more for long stationary periods to get a better estimation of the position. You can do this iteratively by removing a bit and seeing whether the position improves as a result. (Keep in mind that some positions might be completely off!).
Once you’re happy with your new labels, you have to update the tag object. To avoid running geopressure_map() and pressurepath_create() for the full timeseries, use tag_upate() and pressurepath_upate() to update only the stationary periods that have changed.
tag <- tag_update(tag, file = "./data/tag-label/18LX-labeled-v4.csv")##
ℹ Pre-process pressure data
✔ Pre-process pressure data [1.2s]
##
⠙ Generate requests for 11 stapelev (on GeoPressureAPI)
✔ Generate requests for 11 stapelev (on GeoPressureAPI)…
##
⠙ Sending requests for 11 stationary periods: 2|0, 3|0,…
✔ Sending requests for 11 stationary periods: 2|0, 3|0,…
##
⠙ 1/11 ETA: 0s |
⠹ 2/11 ETA: 1s |
⠸ 3/11 ETA: 1s |
⠼ 4/11 ETA: 1s |
⠴ 5/11 ETA: 1s |
⠦ 6/11 ETA: 1s |
⠧ 7/11 ETA: 1s |
⠇ 8/11 ETA: 0s |
⠏ 9/11 ETA: 0s |
⠋ 10/11 ETA: 0s |
ℹ Compute maps (on GEE server) and download .geotiff
✔ Compute maps (on GEE server) and download .geotiff [1…
##
⠙ 1/11 ETA: 0s |
⠹ 2/11 ETA: 8s |
⠸ 3/11 ETA: 31s |
⠼ 4/11 ETA: 20s |
⠴ 5/11 ETA: 18s |
⠦ 6/11 ETA: 13s |
⠧ 7/11 ETA: 9s |
⠇ 8/11 ETA: 6s |
⠏ 9/11 ETA: 3s |
⠋ 10/11 ETA: 2s |
ℹ Process maps
✔ Process maps [133ms]
pressurepath <- pressurepath_update(pressurepath, tag)##
⠙ Generate requests (on GeoPressureAPI) for 5 stationar…
✔ Generate requests (on GeoPressureAPI) for 5 stationar…
##
⠙ 1/5 ETA: 0s |
⠹ 2/5 ETA: 0s |
⠸ 3/5 ETA: 0s |
⠼ 4/5 ETA: 0s |
⠙ Compute and download timeseries (on GEE server)
✔ Compute and download timeseries (on GEE server) [7ms]
##
⠙ 1/5 ETA: 7s |
! Requested position is on water and will be move to the closet point on shore
## (<https://www.google.com/maps/dir/35.5,-3.5/35.175,-3.475>) located 39 km
## away.
##
⠹ 2/5 ETA: 9s |
⠸ 3/5 ETA: 5s |
! Requested position is on water and will be move to the closet point on shore
## (<https://www.google.com/maps/dir/39.5,17.5/39.275,17.075>) located 48 km
## away.
##
⠼ 4/5 ETA: 2s |
! Requested position is on water and will be move to the closet point on shore
## (<https://www.google.com/maps/dir/41.5,16.5/41.275,16.275>) located 35 km
## away.
##
8.6.4 Check 4: Histogram of pressure error
In addition to the pressure timeseries, you can also look at the histogram of the pressure error between geolocator and ERA5 timeseries.
- For long stationary periods (over 5 days), you want to check that there is a single mode in your distribution. Two modes indicate that the bird is spending time at two different altitudes. This is usual when birds have a day site and a night roost at different elevations. In such cases, use the
elev_xlabel. - The red vertical dotted line indicates +/-3 sd which can be helpful to identify potential outliers (identical to the orange dot in the timeseries plot).
- Stationary periods which have an empirical sd greater than the one used (
sd) are highlighted in red. The likelihood map for these stationary periods might not be correct.
plot_pressurepath(pressurepath, type = "hist", plot_plotly = FALSE)
How to calibrate sd?
As mentioned in pressure map, sd should be adjusted to your own data. Assuming that the position of the pressurepath
is correct, you can use the empirical sd value displayed on the histogram to guide you in setting the standard deviation parameter sd in geopressure_map().
Note that you can use different a sd value to account for stationary periods with high altitudinal variation (e.g. mountainous areas), while keeping a low sd value when the bird is in a low-topography area.
In this case, an sd=1 (default value) seems adequate, though 0.8-0.9 might offer more precision positioning.
8.6.5 Check 5: GeoPressureViz
The shiny app GeoPressureViz is another important tool to be used in parallel of checking the label with the pressurepath (checks 3-5). More details on this app and how to use it can be found in the GeopressureViz chapter.
geopressureviz(
tag = tag, # required
pressurepath = pressurepath, # optional
)You are essentially checking the same issues as mentioned above, but now using the likely distance between stationary periods, you check the pressure of a realistic path.
Can you “draw” the trajectory?
A good test before building the graph, is to see if you can manually roughly draw a path from the combination of the pressure/light maps and the flight duration. You should be able to move the position of the trajectory such that the flight distances are realistic and positing are likely according to the likelihood maps. If so, you can move to building your graph! If not, check your label in Trainset again. Remember that birds can have a much higher groundspeed when the wind is blowing their way (up to 150km/h for instance) - such extremes are usually restricted to long flights. In such cases, the circle on GeopressureViz will look too small, but that’s ok.
In GeopressureViz, click on “Start editing” to modify the path to something likely based on long stationary periods. Query pressure at the new edited location to figure out potential vertical movements during short stationary periods which need to be labeled.
8.6.6 Check 6: Most likely path
Labelling should really be checked at almost each step of the workflow. It is recommended to always check your most likely path with the same checks performed in 3-5.
# Update tag and pressurepath
tag <- tag_update(tag, file = "./data/tag-label/18LX-labeled.csv")##
ℹ Pre-process pressure data
✔ Pre-process pressure data [21ms]
##
⠙ Generate requests for 3 stapelev (on GeoPressureAPI)
✔ Generate requests for 3 stapelev (on GeoPressureAPI) …
##
⠙ Sending requests for 3 stationary periods: 13|0, 15|0…
✔ Sending requests for 3 stationary periods: 13|0, 15|0…
##
⠙ 1/3 ETA: 0s |
⠹ 2/3 ETA: 0s |
ℹ Compute maps (on GEE server) and download .geotiff
✔ Compute maps (on GEE server) and download .geotiff [7…
##
⠙ 1/3 ETA: 0s |
⠹ 2/3 ETA: 0s |
ℹ Process maps
✔ Process maps [44ms]
# Build graph, add wing, add movement
graph <- graph_create(tag) |>
graph_add_wind(tag$pressure) |>
graph_set_movement(bird = bird_create("Acrocephalus arundinaceus"))##
ℹ Check data input
✔ Check data input [31ms]
##
ℹ Create graph from maps
✔ Create graph from maps [4.2s]
##
⠙ Computing the groundspeed for 194036 edges for 28 sta…
The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
## which was just loaded, will retire in October 2023.
## Please refer to R-spatial evolution reports for details, especially
## https://r-spatial.org/r/2023/05/15/evolution4.html.
## It may be desirable to make the sf package available;
## package maintainers should consider adding sf to Suggests:.
## The sp package is now running under evolution status 2
## (status 2 uses the sf package in place of rgdal)
## The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
## which was just loaded, will retire in October 2023.
## Please refer to R-spatial evolution reports for details, especially
## https://r-spatial.org/r/2023/05/15/evolution4.html.
## It may be desirable to make the sf package available;
## package maintainers should consider adding sf to Suggests:.
## The sp package is now running under evolution status 2
## (status 2 uses the sf package in place of rgdal)
## The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
## which was just loaded, will retire in October 2023.
## Please refer to R-spatial evolution reports for details, especially
## https://r-spatial.org/r/2023/05/15/evolution4.html.
## It may be desirable to make the sf package available;
## package maintainers should consider adding sf to Suggests:.
## The sp package is now running under evolution status 2
## (status 2 uses the sf package in place of rgdal)
## The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
## which was just loaded, will retire in October 2023.
## Please refer to R-spatial evolution reports for details, especially
## https://r-spatial.org/r/2023/05/15/evolution4.html.
## It may be desirable to make the sf package available;
## package maintainers should consider adding sf to Suggests:.
## The sp package is now running under evolution status 2
## (status 2 uses the sf package in place of rgdal)
##
✔ Computing the groundspeed for 194036 edges for 28 sta…
##
ℹ Prune graph
⠙ 1/54 ETA: 0s |
⠹ 2/54 ETA: 0s |
⠸ 3/54 ETA: 0s |
⠼ 4/54 ETA: 0s |
⠴ 5/54 ETA: 0s |
⠦ 6/54 ETA: 0s |
⠧ 7/54 ETA: 0s |
⠇ 8/54 ETA: 0s |
⠏ 9/54 ETA: 0s |
⠋ 10/54 ETA: 0s |
⠙ 11/54 ETA: 0s |
⠹ 12/54 ETA: 0s |
⠸ 13/54 ETA: 0s |
⠼ 14/54 ETA: 0s |
⠴ 15/54 ETA: 0s |
⠦ 16/54 ETA: 0s |
⠧ 17/54 ETA: 0s |
⠇ 18/54 ETA: 0s |
⠏ 19/54 ETA: 0s |
⠋ 20/54 ETA: 0s |
⠙ 21/54 ETA: 0s |
⠹ 22/54 ETA: 0s |
⠸ 23/54 ETA: 0s |
⠼ 24/54 ETA: 0s |
⠴ 25/54 ETA: 0s |
⠦ 26/54 ETA: 0s |
⠧ 27/54 ETA: 0s |
⠇ 28/54 ETA: 0s |
⠏ 29/54 ETA: 0s |
⠋ 30/54 ETA: 0s |
⠙ 31/54 ETA: 0s |
⠹ 32/54 ETA: 0s |
⠸ 33/54 ETA: 0s |
⠼ 34/54 ETA: 0s |
⠴ 35/54 ETA: 0s |
⠦ 36/54 ETA: 0s |
⠧ 37/54 ETA: 0s |
⠇ 38/54 ETA: 0s |
⠏ 39/54 ETA: 0s |
⠋ 40/54 ETA: 0s |
⠙ 41/54 ETA: 0s |
⠹ 42/54 ETA: 0s |
⠸ 43/54 ETA: 0s |
⠼ 44/54 ETA: 0s |
⠴ 45/54 ETA: 0s |
⠦ 46/54 ETA: 0s |
⠧ 47/54 ETA: 0s |
⠇ 48/54 ETA: 0s |
⠏ 49/54 ETA: 0s |
⠋ 50/54 ETA: 0s |
⠙ 51/54 ETA: 0s |
⠹ 52/54 ETA: 0s |
⠸ 53/54 ETA: 0s |
ℹ Prune graph
✔ Prune graph [613ms]
##
0 ■■ 5% | ETA: 24s
0 ■■■■■ 14% | ETA: 23s
0 ■■■■■ 15% | ETA: 23s
0 ■■■■■■ 15% | ETA: 23s
0 ■■■■■■■ 19% | ETA: 24s
0 ■■■■■■■■■■ 29% | ETA: 27s
0 ■■■■■■■■■■■ 33% | ETA: 27s
0 ■■■■■■■■■■■■ 37% | ETA: 25s
0 ■■■■■■■■■■■■■■■■ 50% | ETA: 18s
0 ■■■■■■■■■■■■■■■■■■ 58% | ETA: 14s
0 ■■■■■■■■■■■■■■■■■■■ 61% | ETA: 13s
0 ■■■■■■■■■■■■■■■■■■■■ 63% | ETA: 12s
0 ■■■■■■■■■■■■■■■■■■■■■ 66% | ETA: 11s
0 ■■■■■■■■■■■■■■■■■■■■■ 67% | ETA: 11s
0 ■■■■■■■■■■■■■■■■■■■■■ 67% | ETA: 11s
0 ■■■■■■■■■■■■■■■■■■■■■■■■ 75% | ETA: 8s
0 ■■■■■■■■■■■■■■■■■■■■■■■■■■■ 87% | ETA: 4s
0 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 90% | ETA: 4s
0 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 96% | ETA: 2s
0 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 96% | ETA: 1s
0 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 98% | ETA: 1s
# Compute most likely path
path_most_likely <- graph_most_likely(graph)##
■ 0% | ETA: 34s
■■ 5% | ETA: 1s
■■■■■ 14% | ETA: 0s
■■■■■ 15% | ETA: 0s
■■■■■■ 15%
## | ETA: 0s
■■■■■■■ 19% | ETA: 0s
■■■■■■■■■■ 29% | ETA: 0s
■■■■■■■■■■■ 33% | ETA:
## 0s
■■■■■■■■■■■■ 37% | ETA: 0s
■■■■■■■■■■■■■■■■ 50% | ETA: 0s
■■■■■■■■■■■■■■■■■■
## 58% | ETA: 0s
■■■■■■■■■■■■■■■■■■■ 61% | ETA: 0s
■■■■■■■■■■■■■■■■■■■ 61% | ETA:
## 0s
■■■■■■■■■■■■■■■■■■■■ 63% | ETA: 0s
■■■■■■■■■■■■■■■■■■■■■ 66% | ETA:
## 0s
■■■■■■■■■■■■■■■■■■■■■ 67% | ETA: 0s
■■■■■■■■■■■■■■■■■■■■■ 67% | ETA:
## 0s
■■■■■■■■■■■■■■■■■■■■■ 67% | ETA: 0s
■■■■■■■■■■■■■■■■■■■■■ 67% | ETA:
## 0s
■■■■■■■■■■■■■■■■■■■■■ 67% | ETA: 0s
■■■■■■■■■■■■■■■■■■■■■■■■ 75% | ETA:
## 0s
■■■■■■■■■■■■■■■■■■■■■■■■■■■ 87% | ETA: 0s
■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 90% |
## ETA: 0s
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 96% | ETA:
## 0s
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 96% | ETA: 0s
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
## 96% | ETA: 0s
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 98% | ETA: 0s
# Compute the corresponding pressurepath
pressurepath <- pressurepath_create(tag, path = path_most_likely)##
⠙ Generate requests (on GeoPressureAPI) for 29 stationa…
✔ Generate requests (on GeoPressureAPI) for 29 stationa…
##
⠙ 1/29 ETA: 7s |
⠹ 2/29 ETA: 8s |
⠸ 3/29 ETA: 7s |
⠼ 4/29 ETA: 7s |
⠴ 5/29 ETA: 7s |
⠦ 6/29 ETA: 8s |
⠧ 7/29 ETA: 8s |
⠇ 8/29 ETA: 8s |
⠏ 9/29 ETA: 7s |
⠋ 10/29 ETA: 7s |
⠙ 11/29 ETA: 7s |
⠹ 12/29 ETA: 7s |
⠸ 13/29 ETA: 7s |
⠼ 14/29 ETA: 6s |
⠴ 15/29 ETA: 6s |
⠦ 16/29 ETA: 6s |
⠧ 17/29 ETA: 6s |
⠇ 18/29 ETA: 5s |
⠏ 19/29 ETA: 5s |
⠋ 20/29 ETA: 5s |
⠙ 21/29 ETA: 4s |
⠹ 22/29 ETA: 4s |
⠸ 23/29 ETA: 3s |
⠼ 24/29 ETA: 3s |
⠴ 25/29 ETA: 2s |
⠦ 26/29 ETA: 2s |
⠧ 27/29 ETA: 1s |
⠇ 28/29 ETA: 1s |
⠙ Compute and download timeseries (on GEE server)
✔ Compute and download timeseries (on GEE server) [9ms]
##
⠙ 1/29 ETA: 1s |
⠹ 2/29 ETA: 1s |
⠸ 3/29 ETA: 1s |
! Requested position is on water and will be move to the closet point on shore
## (<https://www.google.com/maps/dir/42.5,14.5/42.375,14.275>) located 26 km
## away.
##
⠼ 4/29 ETA: 1s |
⠴ 5/29 ETA: 46s |
⠦ 6/29 ETA: 37s |
⠧ 7/29 ETA: 30s |
⠇ 8/29 ETA: 25s |
⠏ 9/29 ETA: 22s |
⠋ 10/29 ETA: 18s |
⠙ 11/29 ETA: 16s |
⠹ 12/29 ETA: 14s |
⠸ 13/29 ETA: 12s |
⠼ 14/29 ETA: 10s |
⠴ 15/29 ETA: 9s |
⠦ 16/29 ETA: 8s |
⠧ 17/29 ETA: 7s |
⠇ 18/29 ETA: 10s |
⠏ 19/29 ETA: 9s |
⠋ 20/29 ETA: 12s |
⠙ 21/29 ETA: 10s |
⠹ 22/29 ETA: 9s |
⠸ 23/29 ETA: 7s |
⠼ 24/29 ETA: 6s |
⠴ 25/29 ETA: 4s |
! Requested position is on water and will be move to the closet point on shore
## (<https://www.google.com/maps/dir/39.5,17.5/39.275,17.075>) located 48 km
## away.
##
⠦ 26/29 ETA: 3s |
! Requested position is on water and will be move to the closet point on shore
## (<https://www.google.com/maps/dir/42.5,17.5/42.925,17.625>) located 45 km
## away.
##
⠧ 27/29 ETA: 2s |
⠇ 28/29 ETA: 1s |
The same figure can be checked again and hopefully everything matches well now! If not, it is important to troubleshoot!
plot_pressurepath(pressurepath)
plot_pressurepath(pressurepath, type = "hist", plot_plotly = FALSE)